<html>
<head><meta charset="utf-8"><title>Windows LLVM Not Builsing · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Windows.20LLVM.20Not.20Builsing.html">Windows LLVM Not Builsing</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="209915728"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Windows%20LLVM%20Not%20Builsing/near/209915728" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Quy Nguyen <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Windows.20LLVM.20Not.20Builsing.html#209915728">(Sep 13 2020 at 06:03)</a>:</h4>
<p>I remember asking about this a while back, but I can't seem to find it now. Are there any special requirements to build LLVM from source on windows? A simple git clone and x.py build gets me a bunch of cmake errors. I had to resort to freeing up 100gb to compile LLVM from vcpkg, but I feel like I'm doing something wrong.</p>



<a name="209915923"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Windows%20LLVM%20Not%20Builsing/near/209915923" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Windows.20LLVM.20Not.20Builsing.html#209915923">(Sep 13 2020 at 06:09)</a>:</h4>
<p>Knowing what errors they were would help?</p>



<a name="209916135"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Windows%20LLVM%20Not%20Builsing/near/209916135" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Quy Nguyen <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Windows.20LLVM.20Not.20Builsing.html#209916135">(Sep 13 2020 at 06:16)</a>:</h4>
<p>Ah yes, that would probably be helpful. (Thought I included them).</p>
<div class="codehilite"><pre><span></span><code>librustc_llvm-1e5f6b2d41c05068.rlib(MachineBasicBlock.cpp.obj) : error LNK2019: unresolved external symbol __imp_rint referenced in function &quot;public: void __cdecl llvm::MachineBasicBlock::print(class llvm::raw_ostream &amp;,class llvm::ModuleSlotTracker &amp;,class llvm::SlotIndexes const *,bool)const &quot; (?print@MachineBasicBlock@llvm@@QEBAXAEAVraw_ostream@2@AEAVModuleSlotTracker@2@PEBVSlotIndexes@2@_N@Z)
          librustc_llvm-1e5f6b2d41c05068.rlib(BranchProbability.cpp.obj) : error LNK2001: unresolved external symbol __imp_rint
          librustc_llvm-1e5f6b2d41c05068.rlib(SimplifyLibCalls.cpp.obj) : error LNK2019: unresolved external symbol __imp_log2 referenced in function &quot;private: class llvm::Value * __cdecl llvm::LibCallSimplifier::replacePowWithExp(class llvm::CallInst *,class llvm::IRBuilder&lt;class llvm::ConstantFolder,class llvm::IRBuilderDefaultInserter&gt; &amp;)&quot; (?replacePowWithExp@LibCallSimplifier@llvm@@AEAAPEAVValue@2@PEAVCallInst@2@AEAV?$IRBuilder@VConstantFolder@llvm@@VIRBuilderDefaultInserter@2@@2@@Z)
          librustc_llvm-1e5f6b2d41c05068.rlib(ConstantFolding.cpp.obj) : error LNK2001: unresolved external symbol __imp_log2
          librustc_llvm-1e5f6b2d41c05068.rlib(SimplifyLibCalls.cpp.obj) : error LNK2019: unresolved external symbol __imp_log2f referenced in function &quot;private: class llvm::Value * __cdecl llvm::LibCallSimplifier::replacePowWithExp(class llvm::CallInst *,class llvm::IRBuilder&lt;class llvm::ConstantFolder,class llvm::IRBuilderDefaultInserter&gt; &amp;)&quot; (?replacePowWithExp@LibCallSimplifier@llvm@@AEAAPEAVValue@2@PEAVCallInst@2@AEAV?$IRBuilder@VConstantFolder@llvm@@VIRBuilderDefaultInserter@2@@2@@Z)
          librustc_llvm-1e5f6b2d41c05068.rlib(ConstantFolding.cpp.obj) : error LNK2019: unresolved external symbol __imp_feclearexcept referenced in function &quot;class llvm::Constant * __cdecl `anonymous namespace&#39;::ConstantFoldBinaryFP(double (__cdecl*)(double,double),double,double,class llvm::Type *)&quot; (?ConstantFoldBinaryFP@?A0xa3245e41@@YAPEAVConstant@llvm@@P6ANNN@ZNNPEAVType@3@@Z)
          librustc_llvm-1e5f6b2d41c05068.rlib(InstrProf.cpp.obj) : error LNK2019: unresolved external symbol __imp_strncpy referenced in function &quot;public: void __cdecl llvm::OverlapStats::dump(class llvm::raw_fd_ostream &amp;)const &quot; (?dump@OverlapStats@llvm@@QEBAXAEAVraw_fd_ostream@2@@Z)
          librustc_llvm-1e5f6b2d41c05068.rlib(WindowsResource.cpp.obj) : error LNK2001: unresolved external symbol __imp_strncpy
          librustc_llvm-1e5f6b2d41c05068.rlib(XCOFFObjectWriter.cpp.obj) : error LNK2001: unresolved external symbol __imp_strncpy
          librustc_llvm-1e5f6b2d41c05068.rlib(WinCOFFObjectWriter.cpp.obj) : error LNK2019: unresolved external symbol __imp__time64 referenced in function &quot;public: virtual unsigned __int64 __cdecl `anonymous namespace&#39;::WinCOFFObjectWriter::writeObject(class llvm::MCAssembler &amp;,class llvm::MCAsmLayout const &amp;)&quot; (?writeObject@WinCOFFObjectWriter@?A0x108a2793@@UEAA_KAEAVMCAssembler@llvm@@AEBVMCAsmLayout@4@@Z)
          librustc_llvm-1e5f6b2d41c05068.rlib(Program.cpp.obj) : error LNK2019: unresolved external symbol __imp__setmode referenced in function &quot;class std::error_code __cdecl llvm::sys::ChangeStdinToBinary(void)&quot; (?ChangeStdinToBinary@sys@llvm@@YA?AVerror_code@std@@XZ)
          librustc_llvm-1e5f6b2d41c05068.rlib(Process.cpp.obj) : error LNK2019: unresolved external symbol __imp__heapwalk referenced in function &quot;public: static unsigned __int64 __cdecl llvm::sys::Process::GetMallocUsage(void)&quot; (?GetMallocUsage@Process@sys@llvm@@SA_KXZ)
          librustc_llvm-1e5f6b2d41c05068.rlib(Process.cpp.obj) : error LNK2019: unresolved external symbol __imp_close referenced in function &quot;public: static class std::error_code __cdecl llvm::sys::Process::SafelyCloseFileDescriptor(int)&quot; (?SafelyCloseFileDescriptor@Process@sys@llvm@@SA?AVerror_code@std@@H@Z)
          librustc_llvm-1e5f6b2d41c05068.rlib(Path.cpp.obj) : error LNK2001: unresolved external symbol __imp_close
          OLDNAMES.lib(close.obi) : error LNK2001: unresolved external symbol __imp_close
          librustc_llvm-1e5f6b2d41c05068.rlib(Path.cpp.obj) : error LNK2019: unresolved external symbol __imp__chsize_s referenced in function &quot;class std::error_code __cdecl llvm::sys::fs::resize_file(int,unsigned __int64)&quot; (?resize_file@fs@sys@llvm@@YA?AVerror_code@std@@H_K@Z)
          librustc_llvm-1e5f6b2d41c05068.rlib(Path.cpp.obj) : error LNK2019: unresolved external symbol __imp_read referenced in function &quot;class std::error_code __cdecl llvm::sys::fs::copy_file_internal(int,int)&quot; (?copy_file_internal@fs@sys@llvm@@YA?AVerror_code@std@@HH@Z)
          OLDNAMES.lib(read.obi) : error LNK2001: unresolved external symbol __imp_read
          librustc_llvm-1e5f6b2d41c05068.rlib(Path.cpp.obj) : error LNK2019: unresolved external symbol __imp_write referenced in function &quot;class std::error_code __cdecl llvm::sys::fs::copy_file_internal(int,int)&quot; (?copy_file_internal@fs@sys@llvm@@YA?AVerror_code@std@@HH@Z)
          librustc_llvm-1e5f6b2d41c05068.rlib(raw_ostream.cpp.obj) : error LNK2001: unresolved external symbol __imp_write
          librustc_llvm-1e5f6b2d41c05068.rlib(ErrorHandling.cpp.obj) : error LNK2001: unresolved external symbol __imp_write
          OLDNAMES.lib(write.obi) : error LNK2001: unresolved external symbol __imp_write
          librustc_llvm-1e5f6b2d41c05068.rlib(Errno.cpp.obj) : error LNK2019: unresolved external symbol __imp_strerror_s referenced in function &quot;class std::basic_string&lt;char,struct std::char_traits&lt;char&gt;,class std::allocator&lt;char&gt; &gt; __cdecl llvm::sys::StrError(int)&quot; (?StrError@sys@llvm@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@Z)
          librustc_llvm-1e5f6b2d41c05068.rlib(raw_ostream.cpp.obj) : error LNK2019: unresolved external symbol __imp_lseek referenced in function &quot;public: __cdecl llvm::raw_fd_ostream::raw_fd_ostream(int,bool,bool)&quot; (??0raw_fd_ostream@llvm@@QEAA@H_N0@Z)
          OLDNAMES.lib(lseek.obi) : error LNK2001: unresolved external symbol __imp_lseek
          librustc_llvm-1e5f6b2d41c05068.rlib(NativeFormatting.cpp.obj) : error LNK2019: unresolved external symbol __imp__fpclass referenced in function &quot;void __cdecl llvm::write_double(class llvm::raw_ostream &amp;,double,enum llvm::FloatStyle,class llvm::Optional&lt;unsigned __int64&gt;)&quot; (?write_double@llvm@@YAXAEAVraw_ostream@1@NW4FloatStyle@1@V?$Optional@_K@1@@Z)
          librustc_llvm-1e5f6b2d41c05068.rlib(JSON.cpp.obj) : error LNK2019: unresolved external symbol __imp_modf referenced in function &quot;public: class llvm::Optional&lt;__int64&gt; __cdecl llvm::json::Value::getAsInteger(void)const &quot; (?getAsInteger@Value@json@llvm@@QEBA?AV?$Optional@_J@3@XZ)
          librustc_llvm-1e5f6b2d41c05068.rlib(Chrono.cpp.obj) : error LNK2019: unresolved external symbol __imp__localtime64_s referenced in function &quot;class llvm::raw_ostream &amp; __cdecl llvm::operator&lt;&lt;(class llvm::raw_ostream &amp;,class std::chrono::time_point&lt;struct std::chrono::system_clock,class std::chrono::duration&lt;__int64,struct std::ratio&lt;1,1000000000&gt; &gt; &gt;)&quot; (??6llvm@@YAAEAVraw_ostream@0@AEAV10@V?$time_point@Usystem_clock@chrono@std@@V?$duration@_JU?$ratio@$00$0DLJKMKAA@@std@@@23@@chrono@std@@@Z)
          C:\Users\quydx\Documents\Code\rust\build\x86_64-pc-windows-msvc\stage0-rustc\x86_64-pc-windows-msvc\release\deps\rustc_driver-f94565c51c798522.dll : fatal error LNK1120: 17 unresolved externals
</code></pre></div>



<a name="209916198"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Windows%20LLVM%20Not%20Builsing/near/209916198" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Quy Nguyen <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Windows.20LLVM.20Not.20Builsing.html#209916198">(Sep 13 2020 at 06:18)</a>:</h4>
<p>I've checked the prereqs on the rustc dev guide and I think I meet all of them.</p>



<a name="209916327"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Windows%20LLVM%20Not%20Builsing/near/209916327" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Windows.20LLVM.20Not.20Builsing.html#209916327">(Sep 13 2020 at 06:24)</a>:</h4>
<p>woo linker errors</p>



<a name="209916427"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Windows%20LLVM%20Not%20Builsing/near/209916427" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Windows.20LLVM.20Not.20Builsing.html#209916427">(Sep 13 2020 at 06:26)</a>:</h4>
<p>ths has the flavor of "MSVC tools were missing"<br>
<a href="https://docs.microsoft.com/en-us/cpp/error-messages/tool-errors/linker-tools-error-lnk2001?view=vs-2019">https://docs.microsoft.com/en-us/cpp/error-messages/tool-errors/linker-tools-error-lnk2001?view=vs-2019</a></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>